package com.hyphenate.chatuidemo.db;

import com.hyphenate.chatuidemo.domain.NewGroupEntity;

import java.util.List;

public class NewGroupDao {
    public static final String TABLE_NAME = "new_groups";

    public static final String COLUMN_GROUP_ID = "easemobGroupId";
    public static final String COLUMN_GROUP_NAME = "name";
    public static final String COLUMN_CREATE_TIME = "createTime";

    /**
     * save contact list
     *
     * @param contactList
     */
    public void saveGroupList(final List<NewGroupEntity> contactList) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                DemoDBManager.getInstance().saveGroupList(contactList);
            }
        }).start();
    }

    public NewGroupEntity getGroupById(String groupId) {
        return DemoDBManager.getInstance().getGroupById(groupId);
    }
}
